import {RequestAction, RequestMethod} from "../configuration/RequestConfiguration";
import {AppRequestPath} from "../configuration/AppConfig";
import {API_PROCEDURE2} from "../constant/API";
import global from "../configuration/global";

export const requestQmsMaterialNewDefault = (action,str) => {
    return RequestAction(
        AppRequestPath() + API_PROCEDURE2,
        RequestMethod.Post,
        {
            'hotelId': global.hotelId,
            'fu': 'QmsMaterialSn',
            'jn': str,
            'jnJson2': '{}',
        },
        action
    )
};


export const requestQmsMaterialAdd = (action,str) => {
    return RequestAction(
        AppRequestPath() + API_PROCEDURE2,
        RequestMethod.Post,
        {
            'hotelId': global.hotelId,
            'fu': 'QmsMaterialAdd',
            'jn': str,
            'jnJson2': '{}',
        },
        action
    )
};

export const requestQmsMaterialEdit = (action,str) => {
    return RequestAction(
        AppRequestPath() + API_PROCEDURE2,
        RequestMethod.Post,
        {
            'hotelId': global.hotelId,
            'fu': 'QmsMaterialEdit',
            'jn': str,
            'jnJson2': '{}',
        },
        action
    )
};


